/**
 * Copyright (C) 2010 altuure <altuure [AT] gmail [DOT] com> http://www.altuure.com/projects/yagdao
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.altuure.yagdao;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Mark up annotation dor DAO access methods.
 * @see YMethodType
 * @author altuure
 */
@Target({ METHOD })
@Retention(RUNTIME)
public @interface YMethod {
    /**
     * @return  CRUD method .
     * @see YMethodType
     */
    YMethodType type() default YMethodType.SAVE;

    /** @return  query name if the query is a named query. */
    String queryName() default "";

    /** @return Query String if dao method is a query.
     *  */
    String query() default "";

    /**
     * @return  select fields.
     */
    String select() default "";
    
    /**Group by Stamement
     * */
    String groupBy() default "";
    
    /**having statement 
     * @return
     */
    String having() default ""; //TODO helper implemented but not integrated
    
    /**@return where statement*/
    String where() default ""; //TODO helper implemented but not integrated

    /**
     *@return  order by string use asc ,desc
     *
     */
    String orderBy() default "";

}
